<? if($this->res!=false):?>
		<?php 
		$date = new Zend_Date($this->res['date'],'yyyy-MM-dd');
		?>
		
	<h2><?php echo $this->res['label']?></h2>
	<div class="news_date"><?php echo $date->toString('dd MMMM, yyyy');?></div>
	
	<?php	/*
	 $images=explode(',', trim($this->res['images']));?>
			<?php if($images[0]):?>
				<?php foreach ($images as $image):?>
				<a class="news_im popup" rel="news" href="<?=$this->image_Helper($image)->crop()->resize(1280,1024)->getUrl();?>"><?=$this->image_Helper($image)->crop()->resize(280,150,'outside','down')->render();?></a>
				<?php endforeach;?>
	<?php endif;?>
	<br class="clear"/>
	<?*/?>
	
	<?php echo $this->res['text']?>
	<br class="clear"/>
	<?php if($this->res['images']):?>
		<?php $images=explode(',', trim($this->res['images']));?>
		<?php if(count($images)>2):?>
		<h3>Фотогалерея</h3>
		<div class='news-gallery-wrapper-wrapper '>
		<div class='news-gallery-wrapper'>
			<span class='prev'></span>
			<span class='next'></span>
			<div class='gallery <?=(count($images)>7) ? 'jcarousel' : '' ?>'>
				<ul class='clearfix'>
					<?php foreach ($images as $image):?>
					<li>
					<a class="img popup" rel="news" href="<?=$this->image_Helper($image)->getUrl();?>">
						<?=$this->image_Helper($image)->resize(128,108,'outside')->crop("center", "middle", 128,108)->render();?>
					</a>
					</li>
					<?php endforeach;?>
				</ul>
			</div>
			</div>
		</div>
		
		<?php endif;?>
	<?php endif;?>
	<div class="socials" style="text-align: right;">
		<script type="text/javascript" src="//yandex.st/share/share.js" charset="utf-8"></script>
		<script type="text/javascript">
				VK.init({apiId: <?=$this->res['id'] ?>, onlyWidgets: true});	
				
		</script>
		<div style="float: left;padding-top: 4px;">
			<div id="vk_like"></div>
		</div>
		<div style="float: left;padding-top: 5px;width: 150px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=<?=urlencode('www.formula-divana.ru'.$_SERVER['REQUEST_URI'])?>&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
		</div>
		<script type="text/javascript">
			window.onload = function () {
 				VK.init({apiId: 2257184, onlyWidgets: true});
 				VK.Widgets.Like('vk_like', {type: "button", pageDescription:'<?=str_replace("\r\n"," ", strip_tags($this->res['resume']));?>',pageTitle: '<?=$this->res['label'] ?>'});
			}
		</script>
		
		<div style="float: right;" class="yashare-auto-init" data-yashareL10n="ru" data-yashareType="none" data-yashareQuickServices="yaru,vkontakte,facebook,twitter,odnoklassniki,moimir,lj,friendfeed,moikrug"></div><div style="float: right;line-height: 28px;">Поделиться:</div> 
	</div>
	<br/>
	<a href="/news/">&larr;Другие новости</a>
	<br/>
	<br/>
<? endif;?>

